using System.Collections.Generic;
using Godot;

public class Jv : IEntity
{
    public List<Vector2I> GetNextPos(Game game, int team, Vector2I current)
    {
        List<Vector2I> ans = [];

        foreach (var rel in Rule.DIRECTLY_MOVEMENT)
        {
            var next = current + rel;
            while (Rule.OnBoard(next) && game.entitySlot[next.X, next.Y] == null)
            {
                ans.Add(next);
                next += rel;
            }

            if (Rule.OnBoard(next) && game.entitySlot[next.X, next.Y]?.team != team)
            {
                ans.Add(next);
            }
        }

        return ans;
    }
}